<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Questions extends Model
{
    //
    protected $table='questions';

    protected $primaryKey = 'id';

    protected $fillable = ['id','company_id','title','options', 'answer', 'explain', 'questions_type','questions_num'];

    /**
     * 获取企业信息
     * @return [type] [description]
     */
    public function getCompanyInfo()
    {
        return $this->belongsTo('App\Models\Company', 'company_id');
    }
}
